import axios from 'axios'
export interface ListItem {
  id: number
  name: string
}
export const fetchEmployees = (): Promise<ListItem> => {
  return axios.get('/api/employees').then((res) => res.data)
}

export const fetchProjects = (): Promise<ListItem[]> => {
  return axios.get('/api/projects').then((res) => res.data)
}

export const fetchTasks = (): Promise<ListItem[]> => {
  return axios.get('/api/tasks').then((res) => res.data)
}
